Skip to content

cmd SCNvimReboot (reboot interpreter)#253

Merged
davidgranstrom merged 1 commit intodavidgranstrom:mainfrom
elgiano:topic/reboot
Jan 23, 2025
Merged

cmd SCNvimReboot (reboot interpreter)#253
davidgranstrom merged 1 commit intodavidgranstrom:mainfrom
elgiano:topic/reboot

Conversation

@elgiano
Copy link
Contributor

@elgiano elgiano commented Oct 25, 2024

Add a SCNvimReboot command, equivalent to scide's "Reboot Interpreter", i.e. scnvim.stop() -> scnvim.start().
I added a callback to stop(), so that start() can be called after stop is done waiting for sclang to stop.

No default keymap, but I added an entry in docs as well.

I use reboot sometimes in case of fire (situations like "Library did not compile successfully.", where you can't just recompile).

Let me know if it sounds like a reasonable addition to scnvim!

@davidgranstrom
Copy link
Owner

@elgiano Sorry this PR slipped my mind, but it looks good and a very nice addition to the plugin. Cheers!

@davidgranstrom davidgranstrom merged commit 2bd34cb into davidgranstrom:main Jan 23, 2025
4 checks passed
@daveriedstra
Copy link
Contributor

Hi - I think this has introduced a regression. Calling :SCNvimStop now produces an error, I think somehow a non-function is being registered as the callback.

Error executing callback:                                                                                                                                                                                                                                     
vim.schedule: expected function                                                                                                                                                                                                                                         
stack traceback:                                                                                                                                                                                                                                                        
        [C]: in function 'schedule'                                                                                                                                                                                                                                     
        .../dried/.config/nvim/plugged/scnvim/lua/scnvim/sclang.lua:247: in function <.../dried/.config/nvim/plugged/scnvim/lua/scnvim/sclang.lua:233> 

@davidgranstrom
Copy link
Owner

Thanks for the report. I had forgotten that when calling a function (e.g. sclang.stop) from a user command, the command attributes are passed as the first argument. Will push a fix shortly.

bsssssss pushed a commit to bsssssss/scnvim that referenced this pull request Sep 2, 2025
bsssssss pushed a commit to bsssssss/scnvim that referenced this pull request Sep 5, 2025
bsssssss pushed a commit to bsssssss/scnvim that referenced this pull request Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants